import "../../styles/modules/console.css"
import Table from "./tables/Table.tsx";
import TableType from "../../model/TableTypes.ts";
import {TableData} from "../../model/TableData.ts";

const TableContainer = (props: {name: string, type: TableType, data: TableData[], modalTrigger: (arg: TableData) => void, updateDataOnPage: () => void }) => {


    const {name, type, data, modalTrigger, updateDataOnPage} = props



    return (
        <div className={"container-console"}>

            <div>

                <h1 className={"mt-3"}>{name}</h1>
            </div>

            <div className="form-floating m-3">
                <input type="text" className="form-control" id="floatingInput" placeholder="Search"/>
                <label htmlFor="floatingInput">Search</label>
            </div>
            <div id="datatable" className={"m-3"}>

               <Table updateDataOnPage={updateDataOnPage} modalTrigger={modalTrigger} type={type} data={data}/>

            </div>

        </div>
    )
}

export default TableContainer